@ECHO OFF
chcp 65001
cd %~dp0


set idFile=..\config\id.txt
set bash=..\lib
 set clspath=%bash%\lib\artoolkitplus-2.3.1-1.4.4.jar

if not exist %idFile%  (
 echo 123 > %idFile%
)


for /f "delims=[" %%i in (%idFile%) do set id= %%i
tasklist|find /i "%id%" |find /i "java.exe"
   
if %errorlevel% == 0 (
    exit 
        
)

SetLocal EnableDelayedExpansion
FOR %%i IN ("%bash%\*.jar") DO SET CLASSPATH=!CLASSPATH!;%%i
java -DLOG_HOME=../ -Dlogback.configurationFile=../config/logback.xml -cp %CLASSPATH% com.tool.cn.ToolMain

::win 10
::%1 mshta vbscript:CreateObject("WScript.Shell").Run("%~s0 ::",0,FALSE)(window.close)&&exit
::java -Dfile.encoding=UTF-8 -Dserver.port=8889 -Dlogging.config=../config/logback.xml -DLOG_HOME=../ -jar ../lib/easy-tool-0.0.1-SNAPSHOT.jar  
:: win7
::start java -Dfile.encoding=UTF-8  -DLOG_HOME=../ -jar ../lib/easy-tool-0.0.1-SNAPSHOT.jar  
::pause